#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void CountString(char str[], int length) {
    int alphaNum = 0, numberNum = 0, spaceNum = 0;
    for (int i = 0; i < length; i++) {
        if ((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z'))
            alphaNum++;
        else if (str[i] >= '0' && str[i] <= '9')
            numberNum++;
        else if (str[i] == ' ')
            spaceNum++;
    }
    printf("alphabet num:%d\n", alphaNum);
    printf("figures num:%d\n", numberNum);
    printf("space num:%d\n", spaceNum);
}

int main() {
    char str[128];
    printf("please input a string:");
    char* stringLine = (char*)malloc(sizeof(char) * 1024);
    int count = 0;

    fgets(stringLine, 1024, stdin);
    
    printf("%s\n", stringLine);

    free(stringLine);
    return 0;
}